const easing = ()=>{
  const list = ['linear', 'quadraticIn','quadraticOut','quadraticInOut','cubicIn','cubicOut','cubicInOut','quarticIn','quarticOut','quarticInOut','quinticIn','quinticOut','quinticInOut','sinusoidalIn','sinusoidalOut','sinusoidalInOut','exponentialIn','exponentialOut','exponentialInOut','circularIn','circularOut','circularInOut','elasticIn','elasticOut','elasticInOut','backIn','backOut','backInOut','bounceIn','bounceOut','bounceInOut']
  const idx = Math.floor(Math.random() * 31)
  return list[idx]
}

const delay = idx => idx * 100 + Math.floor(Math.random() * 100)

const animation = {
  animation:true,
  animationThreshold:2000,
  animationDuration:delay,
  animationEasing:easing(),
  animationDelay:delay,
  animationDurationUpdate:delay,
  animationEasingUpdate:easing(),
  animationDelayUpdate:delay
}

export default animation